package com.jiyinit.web.core.video.service;

import java.util.List;

import javax.annotation.Resource;

import com.jiyinit.web.core.video.vo.MobilRoleUserVo;
import org.springframework.stereotype.Service;

import com.jiyinit.core.framework.base.paging.PagingResult;
import com.jiyinit.web.core.video.dao.TabCoreMroleUserDao;
import com.jiyinit.web.core.video.dto.MroleUserRequest;
import com.jiyinit.web.core.video.entity.TabCoreMroleUserEntity;

@Service("core.mroleUserServiceImpl")
public class MroleUserServiceImpl {
	
	@Resource(name = "core.tabCoreMroleUserDao")
	private TabCoreMroleUserDao tabCoreMroleUserDao;
	
	
	/**
     * 多条件分页查询
     * @param request
     * @return
     */
	public PagingResult<TabCoreMroleUserEntity> findForPage(MroleUserRequest request){
        return tabCoreMroleUserDao.findForPage(request);
    }
	
	/**
	 * id查询
     * @param id
     * @return
     */
	public TabCoreMroleUserEntity findOne(Integer id){
		return tabCoreMroleUserDao.findOne(id);
	}
	
	/**
	 * 添加
     * @param entity
     * @return
     */
	public int add(TabCoreMroleUserEntity entity){
		return tabCoreMroleUserDao.add(entity);
	}
	
	/**
	 * 修改
     * @param entity
     * @return
     */
	public int update(TabCoreMroleUserEntity entity){
		return tabCoreMroleUserDao.update(entity);
	}
	
	/**
	 * 删除
     * @param id
     * @return
     */
	public int delete(Integer id){
		return tabCoreMroleUserDao.delete(id);
	}

	public PagingResult<MobilRoleUserVo> findAllBySelective(MroleUserRequest request){
		return tabCoreMroleUserDao.findAllBySelective(request);
	}

	/**
	 * 修改用户角色
	 * @param entity
	 * @return
     */
	public int updateByUserId(TabCoreMroleUserEntity entity){
		return tabCoreMroleUserDao.updateByUserId(entity);
	}


}
